]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
appDisplay: Fall back to app name in icon menu
authorFlorian Müllner <fmuellner@gnome.org>
Tue, 20 Feb 2018 17:16:52 +0000 (18:16 +0100)
committerJonas Ådahl <jadahl@gmail.com>
Thu, 31 May 2018 11:27:43 +0000 (11:27 +0000)
The app icon's context menu contains a list of open windows,
identified by their title. As we currently don't handle the
case where the app didn't set a title, we end up with empty
menu items which looks clearly broken. Fall back to the app's
name in that case.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/26

js/ui/appDisplay.js

index 74c772d50442863984fca31fde526d0b9554c352..2c4d2d1da498490d3a80fa668aa8127db3468074 100644 (file)
@@ -1870,7 +1870,9 @@ var AppIconMenu = new Lang.Class({
                 this._appendSeparator();
                 separatorShown = true;
             }
-            let item = this._appendMenuItem(window.title);
+            let title = window.title ? window.title
+                                     : this._source.app.get_name();
+            let item = this._appendMenuItem(title);
             item.connect('activate', () => {
                 this.emit('activate-window', window);
             });